#@layer()


#define content()

<section class="content">

    <div class="row">
        <div class="col-12">
            <form class=" form-setting autoAjaxSubmit" autocomplete="off"
                  action="#(CPATH)/admin/user/doMemberSave"
                  method="POST"
                  data-ok-function="closeLayer"
            >
                <input type="hidden" name="member.id" value="#(member.id ??)">
                <input type="hidden" name="member.user_id" value="#para('userId')">
                <div class="card-body">


                    <div class="form-group row">
                        <label class="col-sm-2 col-form-label">会员</label>
                        <div class="col-sm-8">
                            <select class="form-control" name="member.group_id">
                                #for(group : groups)
                                <option value="#(group.id ??)">
                                    #(group.name ??)
                                </option>
                                #end
                            </select>
                        </div>
                    </div>


                    <div class="form-group row">
                        <label class="col-sm-2 col-form-label">到期时间</label>
                        <div class="col-sm-8">
                            <input type="input" name="member.duetime" class="form-control datetime"
                                   value="#(member.duetime ??)"
                                   placeholder="该会员的到期时间">
                        </div>
                    </div>


                    <div class="form-group row">
                        <label class="col-sm-2 col-form-label">来源</label>
                        <div class="col-sm-8">
                            <select class="form-control" name="member.source">
                                <option value="buy"> 用户购买</option>
                                <option value="free"> 免费赠送</option>
                                <option value="other"> 其他</option>
                            </select>
                        </div>
                    </div>

                    <div class="form-group row">
                        <label class="col-sm-2 col-form-label">状态</label>
                        <div class="col-sm-8">
                            <select class="form-control" name="member.status">
                                <option value="9"> 正常 </option>
                                <option value="1"> 禁用 </option>
                            </select>
                        </div>
                    </div>


                    <div class="form-group row">
                        <label class="col-sm-2 col-form-label">备注</label>
                        <div class="col-sm-8">
                                    <textarea rows="5" name="member.remark" class="form-control"
                                              placeholder="该会员的备注信息...">#(member.remark ??)</textarea>
                        </div>
                    </div>
                </div>
                <!-- /.card-body -->
                <div class="card-footer">
                    <div class="offset-9 col-sm-2 submit-block">
                        <div class="card-submit">
                            <button type="submit" class="btn btn-primary">提交</button>
                        </div>
                    </div>
                </div>
                <!-- /.card-footer -->
            </form>
        </div>
    </div>

</section>

#end
